package com.ylb.rent.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 import com.ylb.rent.dao.CancelMapper;
import  com.ylb.rent.entity.Cancel;
import com.ylb.rent.service.ICancelService;

/**
 * 取消策略Service业务层处理
 * 
 * @author ylb
 * @date 2023-06-29
 */
@Service
public class CancelServiceImpl implements ICancelService 
{
    @Autowired
    private CancelMapper cancelMapper;

    /**
     * 查询取消策略
     * 
     * @param id 取消策略主键
     * @return 取消策略
     */
    @Override
    public Cancel selectCancelById(Long id)
    {
        return cancelMapper.selectCancelById(id);
    }

    /**
     * 查询取消策略列表
     * 
     * @param cancel 取消策略
     * @return 取消策略
     */
    @Override
    public List<Cancel> selectCancelList(Cancel cancel)
    {
        return cancelMapper.selectCancelList(cancel);
    }

    /**
     * 新增取消策略
     * 
     * @param cancel 取消策略
     * @return 结果
     */
    @Override
    public int insertCancel(Cancel cancel)
    {
        return cancelMapper.insertCancel(cancel);
    }

    /**
     * 修改取消策略
     * 
     * @param cancel 取消策略
     * @return 结果
     */
    @Override
    public int updateCancel(Cancel cancel)
    {
        return cancelMapper.updateCancel(cancel);
    }

    /**
     * 批量删除取消策略
     * 
     * @param ids 需要删除的取消策略主键
     * @return 结果
     */
    @Override
    public int deleteCancelByIds(Long[] ids)
    {
        return cancelMapper.deleteCancelByIds(ids);
    }

    /**
     * 删除取消策略信息
     * 
     * @param id 取消策略主键
     * @return 结果
     */
    @Override
    public int deleteCancelById(Long id)
    {
        return cancelMapper.deleteCancelById(id);
    }
}
